/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rhythm.commons.net.messaging;

import com.rhythm.base.Messages;
import com.rhythm.base.Strings;
import com.rhythm.commons.validation.InvalidStateException;
import com.rhythm.commons.validation.ExceptionBuilder;
import com.rhythm.commons.validation.Validatable;
import com.rhythm.commons.validation.Validator;

import javax.mail.Session;

/**
 *
 * @author Michael J. Lee
 */
public class SimpleSMTPMessage implements Validatable<SimpleSMTPMessage> {

    private final Session session;
    private String recepient;
    private String sender;
    private String subject;
    private String body;

    public SimpleSMTPMessage(Session session) {
        this.session = session;
    }

    Session getSession() {
        return session;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getRecepient() {
        return recepient;
    }

    public void setRecepient(String recepient) {
        this.recepient = recepient;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public void checkState(Validator<SimpleSMTPMessage> validator) throws InvalidStateException {
        validator.checkState(this);
    }


}
